package cn.codesugar.jetpack.repository

import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import cn.codesugar.jetpack.model.User

object Repository {

    fun getUser(userId: String) : LiveData<User> {
        val liveData = MutableLiveData<User>()
        liveData.value = User(userId, userId, 0)
        return liveData
    }

    fun refresh() : LiveData<Int> {
        val liveData = MutableLiveData<Int>()
        val randomValue = (0..100000000).random()
        liveData.value = randomValue
        return liveData
    }
}